package ui;

import bayes.BayesSwing;
import bayes.MultiSwing;
import clustering.AlgoKMeans;
import clustering.AlgoKMeans.Distance;
import clustering.KMeansResult;
import engine.AbstractVectorTI;
import engine.AbstractVectorTI.VectorType;
import engine.Stats;
import engine.Tweet.Brand;
import engine.Tweet.Polarity;
import java.awt.Font;
import java.io.File;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ExecutionException;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import normalisation.NgrammeNorm;
import normalisation.Normalizer;
import normalisation.Normalizer.EncodageType;
import normalisation.Normalizer.NormalisationType;
import utilities.MapTools;
import utilities.VersionComparator;

public class UserInterface extends javax.swing.JFrame {

    private Stats stats;
    private Normalizer normalizer;
    private AlgoKMeans kmeans;

    public UserInterface() {
        //Extinction si version de java < 1.6
        String versionClient = System.getProperty("java.version");
        if (VersionComparator.compare(versionClient, "1.6") < 0) {
            displayErrorPopup("Ce programme necessite la JVM 1.6 ou supérieur. Veuillez mettre a jour la JVM. (Version detectee: " + versionClient + ").");
            System.exit(0);
        }

        initComponents();
        initRadioButtonGroups();

        this.setLocationRelativeTo(null);
    }

    private void initRadioButtonGroups() {
        buttonGroupNormalisation.add(rbTokenisation);
        buttonGroupNormalisation.add(rbRacinisation);
        buttonGroupNormalisation.add(rbNGram);

        buttonGroupEncodage.add(rbISO);
        buttonGroupEncodage.add(rbUTF8);

        buttonGroupDistances.add(rbDistEuclidienne);
        buttonGroupDistances.add(rbDistManhattan);
        buttonGroupDistances.add(rbDistMinkowski);

        buttonGroupCondArretKMeans.add(rbIterations);
        buttonGroupCondArretKMeans.add(rbDistMax);

        buttonGroupVectorType.add(rbDense);
        buttonGroupVectorType.add(rbSparse);
        buttonGroupVectorType.add(rbNone);

        buttonGroupBayes.add(rbBinomial);
        buttonGroupBayes.add(rbMultinomial);
    }

    //Affiche une popup d'erreur
    public void displayErrorPopup(String msg) {
        JOptionPane.showMessageDialog(this, msg, "Erreur", JOptionPane.ERROR_MESSAGE);
    }

    //Crée un normalizer à partir de l'interface
    private Normalizer makeNormaliser() {
        //Type d'encodage
        EncodageType encodageType = EncodageType.UTF_8;

        if (rbISO.isSelected()) {
            encodageType = EncodageType.ISO_8859_1;
        }

        //Type de normalisation
        NormalisationType normalisationType;
        if (rbNGram.isSelected()) {
            normalisationType = NormalisationType.NGram;

            return new NgrammeNorm(
                    encodageType,
                    cbFilterAccents.isSelected(),
                    cbFilterPonctuation.isSelected(),
                    cbFiltrerNombres.isSelected(),
                    cbFilterSW.isSelected(),
                    txtStopWordPath.getText(),
                    cbFilterOneOccurence.isSelected(),
                    cbFilterTags.isSelected(),
                    cbReplaceUrls.isSelected(),
                    txtUrlReplacedBy.getText(),
                    Integer.parseInt(txtNGram.getText()));
        } else {

            if (rbRacinisation.isSelected()) {
                normalisationType = NormalisationType.Racinisation;
            } else {
                normalisationType = NormalisationType.Tokenisation;
            }

            return new Normalizer(normalisationType,
                    encodageType,
                    cbFilterAccents.isSelected(),
                    cbFilterPonctuation.isSelected(),
                    cbFiltrerNombres.isSelected(),
                    cbFilterSW.isSelected(),
                    txtStopWordPath.getText(),
                    cbFilterOneOccurence.isSelected(),
                    cbFilterTags.isSelected(),
                    cbReplaceUrls.isSelected(),
                    txtUrlReplacedBy.getText());
        }
    }

    //Bouton Calculer Statistiques
    private void btnMakeStats() {
        //Erreur si le chemin du fichier train est incorrect
        if (!(new File(txtTrainPath.getText())).exists()) {
            displayErrorPopup("Le fichier " + txtTrainPath.getText() + " est introuvable.");
            return;
        }

        //Si filtrer stopWord check, mais chemin incorrect, popup d'erreur
        if (cbFilterSW.isSelected() && !(new File(txtStopWordPath.getText()).exists())) {
            displayErrorPopup("Le fichier " + txtStopWordPath.getText() + " est introuvable.");
            return;
        }

        //Désactiver pour éviter un 2ème clic involontaire
        btnMakeStats.setEnabled(false);

        //Création du normalizer
        this.normalizer = makeNormaliser();

        //Type de vecteurs tf idf à générer
        VectorType vectorType;
        if (rbDense.isSelected()) {
            vectorType = VectorType.Dense;
        } else if (rbSparse.isSelected()) {
            vectorType = VectorType.Sparse;
        } else {
            vectorType = VectorType.None;
        }

        this.stats = new Stats(txtTrainPath.getText(), normalizer, vectorType);
        this.stats.setGui(this);
        this.stats.execute();
        //Appel statsFilled() quand le thread termine
    }

    //Stats a terminé
    public void statsFilled() {

        //Update statistiques sur l'UI
        lblUniqueWords.setText(stats.getUniqueWordsCount().toString());
        lblTotalWords.setText(stats.getTotalWordsCount().toString());
        lblTweetCount.setText(stats.getTweetsCount().toString());
        lblAvgWordCount.setText(stats.getAvgWordCount().toString());

        //Top & Flop
        fillTopAndFlop();

        //Réactiver le bouton et le renommer
        btnMakeStats.setText("Recalculer");
        btnMakeStats.setEnabled(true);

        //Activer Algo KMeans & classifieurs
        btnKMeans.setEnabled(true);
        buttonBayesTrain.setEnabled(true);
        buttonBayesTest.setEnabled(true);
    }

    private void fillTopAndFlop() {

        TreeMap<String, Integer>[] tfMapsPolarity = this.stats.getTfMapsPolarity();//Tableau des tfMap pour chaque polarité
        TreeMap<String, Integer>[] tfMapsBrand = this.stats.getTfMapsBrand();//Tableau des tfMap pour chaque marque

        //Taille des deux enum (moins les unknown)
        Integer polarityAndBrandSizes = tfMapsPolarity.length - 1 + tfMapsBrand.length - 1;

        //Panels
        JPanel[] panelsTop = new JPanel[polarityAndBrandSizes];
        //JPanel[] panelsFlop = new JPanel[polarityAndBrandSizes];

        for (int i = 0; i < polarityAndBrandSizes; i++) {

            if (i < tfMapsPolarity.length - 1) {//polarités
                if (i == Polarity.positive.ordinal()) {
                    panelsTop[i] = paneTopPositive;
                    //panelsFlop[i] = ;
                } else if (i == Polarity.negative.ordinal()) {
                    panelsTop[i] = paneTopNegative;
                } else if (i == Polarity.neutral.ordinal()) {
                    panelsTop[i] = paneTopNeutral;
                } else if (i == Polarity.irrelevant.ordinal()) {
                    panelsTop[i] = paneTopIrrelevant;
                }
            } else {//marques
                Integer index = i - (tfMapsPolarity.length - 1);

                if (index == Brand.apple.ordinal()) {
                    panelsTop[i] = paneTopApple;
                } else if (index == Brand.google.ordinal()) {
                    panelsTop[i] = paneTopGoogle;
                } else if (index == Brand.microsoft.ordinal()) {
                    panelsTop[i] = paneTopMicrosoft;
                } else if (index == Brand.twitter.ordinal()) {
                    panelsTop[i] = paneTopTwitter;
                }
            }

            panelsTop[i].removeAll();
        }

        Integer wordsToDisplay = Integer.parseInt(txtWordsToDisplay.getText());
        Integer mapIndexPosition;
        JLabel currentLabel;
        TreeMap<String, Integer>[] currentMaps;
        TreeMap<String, Integer> currentMap;
        Integer currentIndex;

//        Writer writer = null;
//        try {
//            writer = new OutputStreamWriter(new FileOutputStream("Tops.txt"));
//        } catch (FileNotFoundException ex) {
//        }

        for (int i = 0; i < polarityAndBrandSizes; i++) {
            mapIndexPosition = 0;
            currentMaps = (i < tfMapsPolarity.length - 1) ? tfMapsPolarity : tfMapsBrand;
            currentIndex = (i < tfMapsPolarity.length - 1) ? i : i - (tfMapsPolarity.length - 1);

//            try {
//                writer.write("\n");
//                if (i < tfMapsPolarity.length - 1) {
//                    writer.write("Top" + wordsToDisplay + " " + Polarity.values()[currentIndex] + "\n");
//                } else {
//                    writer.write("Top" + wordsToDisplay + " " + Brand.values()[currentIndex] + "\n");
//                }
//            } catch (IOException ex) {
//            }
            //Tri de la map
            currentMap = MapTools.getSortedMap(currentMaps[currentIndex]);

            for (Map.Entry<String, Integer> e : currentMap.entrySet()) {
                //Création du label
                currentLabel = new JLabel(e.getKey() + ", ");
                currentLabel.setFont(currentLabel.getFont().deriveFont(15f).deriveFont(Font.BOLD));
                currentLabel.setToolTipText(e.getValue() + " occurence");

                //Top
                if (mapIndexPosition < wordsToDisplay) {
//                    try {
//                        writer.write(String.format("%4d ", e.getValue()) + e.getKey() + "\n");
//                    } catch (IOException ex) {
//                    }
                    panelsTop[i].add(currentLabel);
                }

//                //Flop
//                if (mapIndexPosition >= tfMapsPolarity[i].size() - wordsToDisplay) {
//                    panelsFlop[i].add(currentLabel);
//                }

                mapIndexPosition++;
            }
        }
//        try {
//            writer.close();
//        } catch (IOException ex) {
//        }
        this.repaint();
    }

    //Barre de progression Stats
    public void updateBarStats(Integer progress) {
        barMakeStats.setValue(progress);
        lblMakeStats.setText(progress + "%");
    }

    //Barre de progression K-moyennes
    public void updateBarKMeans(Integer progress) {
        barKmeans.setValue(progress);
        lblKmeans.setText(progress + "%");
    }

    //Bouton Calculer K-moyennes
    private void btnKMeans() {
        //Désactiver pour éviter un clic involontaire
        btnKMeans.setEnabled(false);
        btnMakeStats.setEnabled(false);

        Distance distanceType;

        if (rbDistManhattan.isSelected()) {
            distanceType = Distance.Manhattan;
        } else if (rbDistMinkowski.isSelected()) {
            distanceType = Distance.Minkowski;
        } else {
            distanceType = Distance.Euclidienne;
        }


        Integer nbIterations = -1;
        Double distMaxTreshold = null;
        if (rbIterations.isSelected()) {
            nbIterations = Integer.parseInt(txtIterations.getText());
        } else {
            distMaxTreshold = Double.parseDouble(txtDistMax.getText());
        }

        Integer cluserCount = Integer.parseInt(txtClusterCount.getText());
        Integer minkowskiParam = Integer.parseInt(txtMinkowskiParam.getText());

        this.kmeans = new AlgoKMeans(this.stats.getTweets(),
                cluserCount,
                distanceType,
                minkowskiParam,
                nbIterations,
                distMaxTreshold,
                null);
        kmeans.setGui(this);
        kmeans.execute();
    }

    public void kMeansFinished() {
        System.out.println("KMeans Finished.");
        try {
            KMeansResult result = kmeans.get();

            //On affiche le vecteur de chaque cluster
            for (Map.Entry<Integer, ArrayList<AbstractVectorTI>> e : result.mapCentroidToVectors.entrySet()) {
                System.out.println("k" + String.format("%2d", e.getKey()) + "(" + String.format("%4d", e.getValue().size()) + ") : " + result.centroids[e.getKey()].toShortString(this.stats.getVocabulary(), 0.15));
            }
        } catch (InterruptedException ex) {
        } catch (ExecutionException ex) {
        }

        //Réactivation des boutons
        btnKMeans.setEnabled(true);
        btnMakeStats.setEnabled(true);
    }

    public void updateBayesResult(Double polarity, Double brand, Integer penalityPoints) {
        DecimalFormat twoDecimals = new DecimalFormat("#.##");

        if (polarity >= 0.) {
            lblSuccesPolarity.setText(twoDecimals.format(polarity) + "%");
        } else {
            lblSuccesPolarity.setText("-");
        }
        if (brand >= 0.) {
            lblSuccesBrand.setText(twoDecimals.format(brand) + "%");
        } else {
            lblSuccesBrand.setText("-");
        }

        lblPenalityPoints.setText(penalityPoints.toString());
    }

    private Double[] getCoeffsAntiPenality() {
        Double[] coeffsAntiPenality = new Double[Polarity.values().length];
        coeffsAntiPenality[Polarity.positive.ordinal()] = Double.parseDouble(txtCoeffPositive.getText());
        coeffsAntiPenality[Polarity.negative.ordinal()] = Double.parseDouble(txtCoeffNegative.getText());
        coeffsAntiPenality[Polarity.neutral.ordinal()] = Double.parseDouble(txtCoeffNeutral.getText());
        coeffsAntiPenality[Polarity.irrelevant.ordinal()] = Double.parseDouble(txtCoeffIrrelevant.getText());
        coeffsAntiPenality[Polarity.unknown.ordinal()] = 1.;

        return coeffsAntiPenality;
    }

    private void btnBayesTrain() {


        BayesSwing bayes = new BayesSwing(this,
                txtTrainPath.getText(),
                txtTrainPath.getText(),
                this.normalizer,
                getCoeffsAntiPenality(),
                txtOutputPath.getText(),
                rbBinomial.isSelected());

        bayes.execute();

    }

    private void btnBayesTest() {

        BayesSwing bayes = new BayesSwing(this,
                txtTestPath.getText(),
                txtTrainPath.getText(),
                this.normalizer,
                getCoeffsAntiPenality(),
                txtOutputPath.getText(),
                rbBinomial.isSelected());
        bayes.execute();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroupNormalisation = new javax.swing.ButtonGroup();
        buttonGroupEncodage = new javax.swing.ButtonGroup();
        buttonGroupDistances = new javax.swing.ButtonGroup();
        buttonGroupCondArretKMeans = new javax.swing.ButtonGroup();
        buttonGroupVectorType = new javax.swing.ButtonGroup();
        buttonGroupBayes = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        txtTrainPath = new javax.swing.JTextField();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        lblUniqueWords = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        lblTotalWords = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        lblTweetCount = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        lblAvgWordCount = new javax.swing.JLabel();
        btnMakeStats = new javax.swing.JButton();
        barMakeStats = new javax.swing.JProgressBar();
        lblMakeStats = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        panelTop = new javax.swing.JPanel();
        paneTopGoogle = new javax.swing.JPanel();
        paneTopMicrosoft = new javax.swing.JPanel();
        paneTopApple = new javax.swing.JPanel();
        paneTopTwitter = new javax.swing.JPanel();
        paneTopPositive = new javax.swing.JPanel();
        paneTopNegative = new javax.swing.JPanel();
        paneTopNeutral = new javax.swing.JPanel();
        paneTopIrrelevant = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        txtWordsToDisplay = new javax.swing.JTextField();
        jPanel9 = new javax.swing.JPanel();
        rbDense = new javax.swing.JRadioButton();
        jLabel12 = new javax.swing.JLabel();
        rbSparse = new javax.swing.JRadioButton();
        rbNone = new javax.swing.JRadioButton();
        jLabel6 = new javax.swing.JLabel();
        txtTestPath = new javax.swing.JTextField();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        cbFilterSW = new javax.swing.JCheckBox();
        cbFilterPonctuation = new javax.swing.JCheckBox();
        cbFiltrerNombres = new javax.swing.JCheckBox();
        txtStopWordPath = new javax.swing.JTextField();
        cbFilterAccents = new javax.swing.JCheckBox();
        cbFilterOneOccurence = new javax.swing.JCheckBox();
        jPanel7 = new javax.swing.JPanel();
        rbTokenisation = new javax.swing.JRadioButton();
        rbRacinisation = new javax.swing.JRadioButton();
        rbNGram = new javax.swing.JRadioButton();
        txtNGram = new javax.swing.JTextField();
        cbReplaceUrls = new javax.swing.JCheckBox();
        txtUrlReplacedBy = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        rbISO = new javax.swing.JRadioButton();
        rbUTF8 = new javax.swing.JRadioButton();
        cbFilterTags = new javax.swing.JCheckBox();
        jTabbedPane3 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        btnKMeans = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        txtClusterCount = new javax.swing.JTextField();
        barKmeans = new javax.swing.JProgressBar();
        lblKmeans = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        txtMinkowskiParam = new javax.swing.JTextField();
        rbDistEuclidienne = new javax.swing.JRadioButton();
        rbDistManhattan = new javax.swing.JRadioButton();
        jLabel9 = new javax.swing.JLabel();
        rbDistMinkowski = new javax.swing.JRadioButton();
        jPanel5 = new javax.swing.JPanel();
        rbDistMax = new javax.swing.JRadioButton();
        rbIterations = new javax.swing.JRadioButton();
        jLabel11 = new javax.swing.JLabel();
        txtDistMax = new javax.swing.JTextField();
        txtIterations = new javax.swing.JTextField();
        jTabbedPane4 = new javax.swing.JTabbedPane();
        jPanel8 = new javax.swing.JPanel();
        buttonBayesTrain = new javax.swing.JButton();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        lblSuccesPolarity = new javax.swing.JLabel();
        lblSuccesBrand = new javax.swing.JLabel();
        buttonBayesTest = new javax.swing.JToggleButton();
        jLabel22 = new javax.swing.JLabel();
        txtOutputPath = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        lblPenalityPoints = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        txtCoeffPositive = new javax.swing.JTextField();
        txtCoeffNegative = new javax.swing.JTextField();
        txtCoeffNeutral = new javax.swing.JTextField();
        txtCoeffIrrelevant = new javax.swing.JTextField();
        rbBinomial = new javax.swing.JRadioButton();
        rbMultinomial = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Projet EIT2 Danilyuk Tixier");

        jLabel1.setText("Chemin Entrainement :");

        txtTrainPath.setText("train.txt");

        jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel2.setText("Mots Uniques :");

        lblUniqueWords.setText("?");

        jLabel3.setText("Mots Total :");

        lblTotalWords.setText("?");

        jLabel4.setText("# Tweets :");

        lblTweetCount.setText("?");

        jLabel5.setText("Moyenne # mots  :");

        lblAvgWordCount.setText("?");

        btnMakeStats.setText("Calculer");
        btnMakeStats.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMakeStatsActionPerformed(evt);
            }
        });

        lblMakeStats.setText("0%");

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel7.setText("Top");

        panelTop.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        panelTop.setMaximumSize(new java.awt.Dimension(425, 70));
        panelTop.setMinimumSize(new java.awt.Dimension(425, 70));

        paneTopGoogle.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopGoogle.setPreferredSize(new java.awt.Dimension(371, 55));

        paneTopMicrosoft.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopMicrosoft.setPreferredSize(new java.awt.Dimension(371, 55));

        paneTopApple.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopApple.setPreferredSize(new java.awt.Dimension(371, 55));

        paneTopTwitter.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopTwitter.setPreferredSize(new java.awt.Dimension(371, 55));

        paneTopPositive.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopPositive.setPreferredSize(new java.awt.Dimension(371, 55));

        paneTopNegative.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopNegative.setPreferredSize(new java.awt.Dimension(371, 55));

        paneTopNeutral.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopNeutral.setPreferredSize(new java.awt.Dimension(371, 55));

        paneTopIrrelevant.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        paneTopIrrelevant.setPreferredSize(new java.awt.Dimension(371, 55));

        jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_google.png"))); // NOI18N
        jLabel8.setToolTipText("Google");

        jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_windows.png"))); // NOI18N
        jLabel13.setToolTipText("Microsoft");

        jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_Apple.png"))); // NOI18N
        jLabel14.setToolTipText("Apple");

        jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_twitter.png"))); // NOI18N
        jLabel15.setToolTipText("Twitter");

        jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_positive.png"))); // NOI18N
        jLabel16.setToolTipText("Positive");

        jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_negative.png"))); // NOI18N
        jLabel17.setToolTipText("Negative");

        jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_neutral.png"))); // NOI18N
        jLabel18.setToolTipText("Neutral");

        jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ui/img/logo_irrelevant.png"))); // NOI18N
        jLabel19.setToolTipText("Irrelevant");

        javax.swing.GroupLayout panelTopLayout = new javax.swing.GroupLayout(panelTop);
        panelTop.setLayout(panelTopLayout);
        panelTopLayout.setHorizontalGroup(
            panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTopLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelTopLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(paneTopGoogle, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(panelTopLayout.createSequentialGroup()
                        .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel13)
                            .addComponent(jLabel14)
                            .addComponent(jLabel15)
                            .addComponent(jLabel16)
                            .addComponent(jLabel17)
                            .addComponent(jLabel18)
                            .addComponent(jLabel19))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(paneTopMicrosoft, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(paneTopApple, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(paneTopTwitter, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(paneTopPositive, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(paneTopNegative, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(paneTopNeutral, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(paneTopIrrelevant, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelTopLayout.setVerticalGroup(
            panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTopLayout.createSequentialGroup()
                .addContainerGap(15, Short.MAX_VALUE)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(paneTopGoogle, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(paneTopMicrosoft, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(paneTopApple, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(paneTopTwitter, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(paneTopPositive, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(paneTopNegative, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(paneTopNeutral, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(paneTopIrrelevant, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19))
                .addContainerGap())
        );

        txtWordsToDisplay.setText("10");

        jPanel9.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        rbDense.setText("Denses");

        jLabel12.setText("Vecteurs TF-IDF :");

        rbSparse.setText("Creux");

        rbNone.setSelected(true);
        rbNone.setText("Aucun");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel12)
                .addGap(33, 33, 33)
                .addComponent(rbDense)
                .addGap(69, 69, 69)
                .addComponent(rbSparse)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(rbNone)
                .addGap(17, 17, 17))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(rbDense)
                    .addComponent(rbSparse)
                    .addComponent(rbNone))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                        .addGap(0, 0, Short.MAX_VALUE)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel5)
                                            .addComponent(jLabel4)))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel2)
                                            .addComponent(jLabel3))
                                        .addGap(38, 38, 38)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(lblTotalWords, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblUniqueWords, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblTweetCount, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblAvgWordCount, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(btnMakeStats)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(barMakeStats, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblMakeStats, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtWordsToDisplay, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(panelTop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 18, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(lblMakeStats, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnMakeStats, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(barMakeStats, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)
                        .addComponent(lblTweetCount)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblAvgWordCount))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel2)
                                    .addComponent(lblUniqueWords))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel3)
                                    .addComponent(lblTotalWords)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel5)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(txtWordsToDisplay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelTop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        panelTop.getAccessibleContext().setAccessibleParent(jLabel1);

        jTabbedPane1.addTab("Statistiques", jPanel1);

        jLabel6.setText("Chemin Test :");

        txtTestPath.setText("test.txt");

        jPanel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        cbFilterSW.setText("Filtrer mots outil :");

        cbFilterPonctuation.setText("Filtrer ponctuation");

        cbFiltrerNombres.setText("Filtrer nombres");

        txtStopWordPath.setText("englishST.txt");

        cbFilterAccents.setText("Filtrer accents");

        cbFilterOneOccurence.setText("Filtrer 1 occurence");

        jPanel7.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        rbTokenisation.setSelected(true);
        rbTokenisation.setText("Tokenisation");

        rbRacinisation.setText("Racinisation EN");

        rbNGram.setText("N-Gramme");

        txtNGram.setText("3");

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbTokenisation)
                            .addComponent(rbRacinisation))
                        .addGap(0, 10, Short.MAX_VALUE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(rbNGram)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtNGram)))
                .addGap(6, 6, 6))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(rbTokenisation)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbRacinisation)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbNGram)
                    .addComponent(txtNGram, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        cbReplaceUrls.setSelected(true);
        cbReplaceUrls.setText("Remplacer urls par :");
        cbReplaceUrls.setActionCommand("");

        txtUrlReplacedBy.setText("urlReplaced");

        jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        rbISO.setText("ISO-8859-1");

        rbUTF8.setSelected(true);
        rbUTF8.setText("UTF-8");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rbUTF8)
                    .addComponent(rbISO))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(rbUTF8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(rbISO))
        );

        cbFilterTags.setText("Filtrer Tags");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbFilterOneOccurence)
                            .addComponent(cbFilterAccents))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(cbFilterPonctuation)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(cbFiltrerNombres))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(cbReplaceUrls)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtUrlReplacedBy, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(cbFilterTags)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cbFilterSW)
                        .addGap(18, 18, 18)
                        .addComponent(txtStopWordPath, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbFilterAccents)
                    .addComponent(cbFilterPonctuation)
                    .addComponent(cbFiltrerNombres))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbFilterOneOccurence)
                    .addComponent(cbReplaceUrls)
                    .addComponent(txtUrlReplacedBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(cbFilterSW)
                        .addComponent(txtStopWordPath, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(cbFilterTags))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Normalisation", jPanel2);

        jPanel3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        btnKMeans.setText("Calculer");
        btnKMeans.setEnabled(false);
        btnKMeans.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKMeansActionPerformed(evt);
            }
        });

        jLabel10.setText("# Clusters :");

        txtClusterCount.setText("20");

        lblKmeans.setText("0%");

        jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        txtMinkowskiParam.setText("3");

        rbDistEuclidienne.setText("Euclidienne");

        rbDistManhattan.setSelected(true);
        rbDistManhattan.setText("Manhattan");

        jLabel9.setText("Distance :");

        rbDistMinkowski.setText("Minkowski");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel9)
                .addGap(18, 18, 18)
                .addComponent(rbDistEuclidienne)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbDistManhattan)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbDistMinkowski)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtMinkowskiParam, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(rbDistEuclidienne)
                    .addComponent(rbDistManhattan)
                    .addComponent(rbDistMinkowski)
                    .addComponent(txtMinkowskiParam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        rbDistMax.setText("dist max parcourue centroid < ");

        rbIterations.setSelected(true);
        rbIterations.setText("# iterations:");

        jLabel11.setText("Condition d'arret :");

        txtDistMax.setText("0.5");

        txtIterations.setText("10");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel11)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(rbDistMax)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtDistMax, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(rbIterations)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtIterations, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(rbIterations)
                    .addComponent(txtIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbDistMax)
                    .addComponent(txtDistMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(btnKMeans)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(barKmeans, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lblKmeans, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap(77, Short.MAX_VALUE))
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(29, 29, 29)
                .addComponent(jLabel10)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtClusterCount, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(txtClusterCount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(barKmeans, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnKMeans, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblKmeans, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(4, 4, 4))
        );

        jTabbedPane3.addTab("K-moyennes", jPanel3);

        jPanel8.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        buttonBayesTrain.setText("Classifier train");
        buttonBayesTrain.setEnabled(false);
        buttonBayesTrain.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonBayesTrainActionPerformed(evt);
            }
        });

        jLabel20.setText("Polarités justes :");

        jLabel21.setText("Marques justes :");

        lblSuccesPolarity.setText("-");

        lblSuccesBrand.setText("-");

        buttonBayesTest.setText("Classifier test");
        buttonBayesTest.setEnabled(false);
        buttonBayesTest.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonBayesTestActionPerformed(evt);
            }
        });

        jLabel22.setText("Sortie: ");

        txtOutputPath.setText("DANILYUK-TIXIER-test-eit-13.txt");

        jLabel23.setText("Pénalité :");

        lblPenalityPoints.setText("-");

        jLabel24.setText("Coefficients anti-pénalité :");

        txtCoeffPositive.setText("1.40");

        txtCoeffNegative.setText("1.20");

        txtCoeffNeutral.setText("1.00");

        txtCoeffIrrelevant.setText("2.05");

        rbBinomial.setSelected(true);
        rbBinomial.setText("Binomial");

        rbMultinomial.setText("Multinomial");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblSuccesBrand))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel22)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtOutputPath, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblSuccesPolarity)
                        .addGap(122, 122, 122)
                        .addComponent(jLabel23)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblPenalityPoints))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel24)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtCoeffPositive, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCoeffNegative, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCoeffNeutral, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCoeffIrrelevant, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(buttonBayesTrain, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(rbBinomial))
                        .addGap(29, 29, 29)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbMultinomial)
                            .addComponent(buttonBayesTest, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(166, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbBinomial)
                    .addComponent(rbMultinomial))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(buttonBayesTest)
                    .addComponent(buttonBayesTrain, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(txtOutputPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(lblSuccesPolarity)
                    .addComponent(jLabel23)
                    .addComponent(lblPenalityPoints))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(lblSuccesBrand))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(txtCoeffPositive, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCoeffNegative, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCoeffNeutral, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCoeffIrrelevant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(53, Short.MAX_VALUE))
        );

        jTabbedPane4.addTab("Bayes", jPanel8);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtTestPath)
                            .addComponent(txtTrainPath, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)))
                    .addComponent(jTabbedPane3)
                    .addComponent(jTabbedPane2)
                    .addComponent(jTabbedPane4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 485, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtTrainPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txtTestPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addComponent(jTabbedPane1)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnMakeStatsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMakeStatsActionPerformed
        btnMakeStats();
    }//GEN-LAST:event_btnMakeStatsActionPerformed

    private void btnKMeansActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKMeansActionPerformed
        btnKMeans();
    }//GEN-LAST:event_btnKMeansActionPerformed

    private void buttonBayesTrainActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonBayesTrainActionPerformed
        btnBayesTrain();
    }//GEN-LAST:event_buttonBayesTrainActionPerformed

    private void buttonBayesTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonBayesTestActionPerformed
        btnBayesTest();
    }//GEN-LAST:event_buttonBayesTestActionPerformed

//    public static void main(String args[]) {
//        /* Set the Nimbus look and feel */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
//         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
//         */
//
//
//
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /* Create and display the form */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            @Override
//            public void run() {
//                new UserInterface().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JProgressBar barKmeans;
    private javax.swing.JProgressBar barMakeStats;
    private javax.swing.JButton btnKMeans;
    private javax.swing.JButton btnMakeStats;
    private javax.swing.JToggleButton buttonBayesTest;
    private javax.swing.JButton buttonBayesTrain;
    private javax.swing.ButtonGroup buttonGroupBayes;
    private javax.swing.ButtonGroup buttonGroupCondArretKMeans;
    private javax.swing.ButtonGroup buttonGroupDistances;
    private javax.swing.ButtonGroup buttonGroupEncodage;
    private javax.swing.ButtonGroup buttonGroupNormalisation;
    private javax.swing.ButtonGroup buttonGroupVectorType;
    private javax.swing.JCheckBox cbFilterAccents;
    private javax.swing.JCheckBox cbFilterOneOccurence;
    private javax.swing.JCheckBox cbFilterPonctuation;
    private javax.swing.JCheckBox cbFilterSW;
    private javax.swing.JCheckBox cbFilterTags;
    private javax.swing.JCheckBox cbFiltrerNombres;
    private javax.swing.JCheckBox cbReplaceUrls;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTabbedPane jTabbedPane3;
    private javax.swing.JTabbedPane jTabbedPane4;
    private javax.swing.JLabel lblAvgWordCount;
    private javax.swing.JLabel lblKmeans;
    private javax.swing.JLabel lblMakeStats;
    private javax.swing.JLabel lblPenalityPoints;
    private javax.swing.JLabel lblSuccesBrand;
    private javax.swing.JLabel lblSuccesPolarity;
    private javax.swing.JLabel lblTotalWords;
    private javax.swing.JLabel lblTweetCount;
    private javax.swing.JLabel lblUniqueWords;
    private javax.swing.JPanel paneTopApple;
    private javax.swing.JPanel paneTopGoogle;
    private javax.swing.JPanel paneTopIrrelevant;
    private javax.swing.JPanel paneTopMicrosoft;
    private javax.swing.JPanel paneTopNegative;
    private javax.swing.JPanel paneTopNeutral;
    private javax.swing.JPanel paneTopPositive;
    private javax.swing.JPanel paneTopTwitter;
    private javax.swing.JPanel panelTop;
    private javax.swing.JRadioButton rbBinomial;
    private javax.swing.JRadioButton rbDense;
    private javax.swing.JRadioButton rbDistEuclidienne;
    private javax.swing.JRadioButton rbDistManhattan;
    private javax.swing.JRadioButton rbDistMax;
    private javax.swing.JRadioButton rbDistMinkowski;
    private javax.swing.JRadioButton rbISO;
    private javax.swing.JRadioButton rbIterations;
    private javax.swing.JRadioButton rbMultinomial;
    private javax.swing.JRadioButton rbNGram;
    private javax.swing.JRadioButton rbNone;
    private javax.swing.JRadioButton rbRacinisation;
    private javax.swing.JRadioButton rbSparse;
    private javax.swing.JRadioButton rbTokenisation;
    private javax.swing.JRadioButton rbUTF8;
    private javax.swing.JTextField txtClusterCount;
    private javax.swing.JTextField txtCoeffIrrelevant;
    private javax.swing.JTextField txtCoeffNegative;
    private javax.swing.JTextField txtCoeffNeutral;
    private javax.swing.JTextField txtCoeffPositive;
    private javax.swing.JTextField txtDistMax;
    private javax.swing.JTextField txtIterations;
    private javax.swing.JTextField txtMinkowskiParam;
    private javax.swing.JTextField txtNGram;
    private javax.swing.JTextField txtOutputPath;
    private javax.swing.JTextField txtStopWordPath;
    private javax.swing.JTextField txtTestPath;
    private javax.swing.JTextField txtTrainPath;
    private javax.swing.JTextField txtUrlReplacedBy;
    private javax.swing.JTextField txtWordsToDisplay;
    // End of variables declaration//GEN-END:variables
}
